<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>新闻列表界面</title>
</head>
<body>
<a href="<%=request.getContextPath()%>/search">搜索</a>
<h1>新闻列表界面</h1>
<%--    表单，表单就用提交数据到后台的--%>
<form action="<%=request.getContextPath()%>/list">
    <input type="text" name="keywords">
    <button>搜索</button>
</form>
<ul>
    <c:forEach items="${list}" var="item">
        <li>
            <a href="${item.url}" target="_blank"><div>${item.title}</div></a>
        </li>
    </c:forEach>
</ul>
</body>
</html>
